﻿using System;

namespace ConsoleApp1
{
    class Circle
    {
        private double Radius
        {
            get;
            set;
        }
        public Circle(double Radius)
        {
            this.Radius = Radius;
        }
        public void changeRadius(double r)
        {
            this.Radius = r;
        }
        public double circleArea
        {
            get
            {
                return Radius * Radius * 3.1415926;
            }
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Circle circle = new Circle(2);
            Console.WriteLine("半径为2的〇的面积为：{0}", circle.circleArea);
            Console.ReadLine();
            double r = 2;
            Console.Clear();
            Console.Write("请输入〇的半径：");
            r = Convert.ToDouble(Console.ReadLine());
            while (r > 0)
            {
                circle.changeRadius(r);
                Console.WriteLine("〇的面积为：{0}", circle.circleArea);
                Console.ReadLine();
                Console.Clear();
                Console.Write("请输入〇的半径：");
                r = Convert.ToDouble(Console.ReadLine());
            }
        }
    }
}
